I need to add some extra display information when my client is viewing a page in preview mode. How would I detect if a page is being viewed in preview mode from the API?
You can analyze the Sitecore.Context.Site.DisplayMode property. It is equal to the Sitecore.Sites.DisplayMode.Edit value in the webedit mode, Sitecore.Sites.DisplayMode.Preview value in the preview mode and Sitecore.Sites.DisplayMode.Normal in the normal mode.